#include <iostream>
#include "adex/log.h"

int main() {
    adex::Logger::ptr logger(new adex::Logger);
    logger->addAppender(adex::LogAppender::ptr(new adex::StdoutLogAppender));

    adex::LogEvent::ptr event(new adex::LogEvent(__FILE__, __LINE__, 0,1,2, time(0)));

    logger->log(adex::LogLevel::DEBUG, event);
    // adex::FileLogAppender::ptr file_appender(new adex::FileLogAppender("./log.txt"));
    // adex::LogFormatter::ptr fmt(new adex::LogFormatter("%d%T%p%T%m%n"));
    // file_appender->setFormatter(fmt);
    // //file_appender->setLevel(sylar::LogLevel::ERROR);

    // logger->addAppender(file_appender);

    std::cout << "hello adex log" << std::endl;

    return 0;
}